/*
 * @Date: 2023-06-12 14:06:28
 * @LastEditors: jia58960 547221469@qq.com
 * @LastEditTime: 2023-06-12 14:15:43
 * @FilePath: \vue3-icloud-web\src\main.ts
 */
// 引入windi css
import '@/plugins/windi.css'

// // 导入全局的svg图标
import 'virtual:svg-icons-register'

// 初始化多语言
import { setupI18n } from '@/plugins/vue-i18n'

// 引入状态管理
import { setupStore } from '@/store'

// 全局组件
import { setupGlobCom } from '@/components'
import core from '@/core'


// 引入element-plus
// import { setupElementPlus } from '@/plugins/element-plus'

// 引入全局样式
import '@/styles/index.less'

// 引入动画
import '@/plugins/animate.css'

// 路由
import { setupRouter } from './router'

// 权限
import { setupPermission } from './directives'

import { createApp } from 'vue'

import App from './App.vue'

// 创建实例
const setupAll = async () => {
  const app = createApp(App)
  app.use(core)
  setupStore(app)

  await setupI18n(app)

  await setupRouter(app)

  setupGlobCom(app)

  // setupElementPlus(app)

  setupPermission(app)
  
  app.mount('#app')
}

setupAll()
